/**
 * Notes: 联系人实体
 * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat)
 * Date: 2024-03-10 19:20:00 
 */

const BaseProjectModel = require('../config/models_config').base_project_model;

class ContactModel extends BaseProjectModel {

}

// 集合名
ContactModel.CL = BaseProjectModel.C('oa_contact');

ContactModel.DB_STRUCTURE = {
    _pid: 'string|true',
    CONTACT_ID: 'string|true',

    CONTACT_CUSTOMER_ID: 'string|true|comment=所属客户ID',
    CONTACT_NAME: 'string|true|comment=联系人姓名',
    CONTACT_POSITION: 'string|false|comment=职位',
    CONTACT_PHONE: 'string|false|comment=电话',
    CONTACT_MOBILE: 'string|false|comment=手机',
    CONTACT_EMAIL: 'string|false|comment=邮箱',
    CONTACT_IS_MAIN: 'int|true|default=0|comment=是否主要联系人：0=否, 1=是',
    CONTACT_INFLUENCE: 'int|false|default=3|comment=影响力：1-5',
    CONTACT_TAGS: 'array|true|default=[]|comment=标签数组',
    CONTACT_BIRTHDAY: 'int|false|comment=生日',
    CONTACT_DESCRIPTION: 'string|false|comment=描述',
    CONTACT_LAST_CONTACT_TIME: 'int|false|comment=最后联系时间',
    
    CONTACT_ADD_USER_ID: 'string|false|comment=创建人ID',
    CONTACT_ADD_TIME: 'int|true',
    CONTACT_EDIT_TIME: 'int|true',
    CONTACT_ADD_IP: 'string|false',
    CONTACT_EDIT_IP: 'string|false',
};

// 字段前缀
ContactModel.FIELD_PREFIX = "CONTACT_";

/**
 * 是否主要联系人：0=否, 1=是
 */
ContactModel.IS_MAIN = {
    NO: 0,
    YES: 1
};

ContactModel.IS_MAIN_DESC = {
    NO: '否',
    YES: '是'
};

module.exports = ContactModel; 